angular.module('app', ['ngRoute', 'app.controllers', 'app.services'])

    .run(['serviceInit', function (si) {
        si.init();
    }])

    .config(['$routeProvider', function ($routeProvider) { //配置路由
        //noinspection JSUnresolvedFunction
        $routeProvider
            .when('/home', { //定义路由规则
                templateUrl: 'home/index.html',
                controller: 'homeCtl'
            })
            .when('/about', {
                templateUrl: 'home/about.html',
                controller: 'aboutCtl'
            })
            .when('/imchat', {
                templateUrl: 'home/imchat.html',
                controller: 'imCtl'
            })
            .otherwise({
                    redirectTo: '/home'
                }
            );
    }]);